package com.jg.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 库存表
 * </p>
 *
 * @author 晓东√
 * @since 2025-09-19 11:18
 */
@Getter
@Setter
@ToString
@TableName("inventory")
@Schema(name = "Inventory", description = "库存表")
public class Inventory extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 库存ID
     */
    @Schema(description = "库存ID")
    @TableId(value = "inventory_id", type = IdType.AUTO)
    private Integer inventoryId;

    /**
     * 商品ID
     */
    @TableField("product_id")
    @Schema(description = "商品ID")
    private Integer productId;

    /**
     * 库存量
     */
    @TableField("quantity")
    @Schema(description = "库存量")
    private Integer quantity;
    //安全库库存量
    @TableField("safe_quantity")
    @Schema(description = "安全库存量")
    private Integer safeQuantity;

    /**
     * 最后更新时间
     */
    @TableField("last_update")
    @Schema(description = "最后更新时间")
    private Date lastUpdate;

    @TableField("product_name")
    private String productName;
}